#ifndef __IIC_PORT_H
#define __IIC_PORT_H

#include "stdint.h"

void IICInit(void);
void IICGenStart(void);
void IICGenStop(void);
uint8_t IICWaitAck(void);
void IICGenAck(void);
void IICGenNoAck(void);

void IICSendOneByte(uint8_t data);
uint8_t IICReadOneByte(uint8_t ack);
uint8_t IICWriteReg(uint8_t slave, uint8_t reg, uint8_t val);
uint8_t IICWriteArray(uint8_t slave, uint8_t reg, uint8_t *array, uint16_t len);
uint8_t IICReadReg(uint8_t slave, uint8_t reg, uint8_t *val);
uint8_t IICReadArray(uint8_t slave, uint8_t reg, uint8_t *array, uint16_t len);

#endif
